package com.finace.management.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.entity.Result;
import com.finace.management.service.TbsystemService;
import com.finace.pojo.TbSystem;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system")
public class SystemController {
    @Reference
    private TbsystemService tbsystemService;



    @RequestMapping("/add.do")
    private Result add(@RequestBody TbSystem tbSystem){
        try{
            tbsystemService.add(tbSystem);
            return new Result(true,"成功");
        }catch (Exception e){
            e.printStackTrace();

            return new Result(true,"失败");
        }
    }
}
